package com.bkhech.tasks;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import com.bkhech.utils.SmsUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

@EnableAsync
@Component
@Slf4j
public class SmsTask {
    @Resource
    private SmsUtils smsUtils;

    @Async("threadPoolExecutor")
    public void sendSms(String phone, String code) {
//        smsUtils.sendSms(phone, code);
        log.info("异步任务中所发送的验证码为：{}", code);
    }

}
